package com.winning.jsyd.entity.describe;

import com.winning.jsyd.utils.NetDataUtil;

import java.io.Serializable;
import java.util.Date;
import java.util.UUID;

/**
 * 记录上传信息
 *
 * @author z_dd@winning.com.cn
 * @date 2019/8/28 9:12
 */
public class Record implements Serializable {
    private String startTime;//任务开始时间
    private String endingTime; //任务结束时间
    private String taskId;//任务ID号
    private String tableName;//上传接口表名
    private int successCount;//一次上传成功总数
    private int failCount;//一次上传失败总数
    private boolean flag;

    public Record(String tableName) {
        this.startTime = NetDataUtil.date(new Date());
        this.tableName = tableName;
        this.endingTime = null;
        this.successCount = 0;
        this.failCount = 0;
        this.flag = true;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getEndingTime() {
        return endingTime;
    }

    public void setEndingTime(String endingTime) {
        this.endingTime = endingTime;
    }

    public String getTaskId() {
        return taskId;
    }

    public void setTaskId(String taskId) {
        this.taskId = taskId;
    }

    public int getSuccessCount() {
        return successCount;
    }

    public void setSuccessCount(int successCount) {
        this.successCount = successCount;
    }

    public int getFailCount() {
        return failCount;
    }

    public void setFailCount(int failCount) {
        this.failCount = failCount;
    }

    public boolean isFlag() {
        return flag;
    }

    public void setFlag(boolean flag) {
        this.flag = flag;
    }

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    @Override
    public String toString() {
        return "Record{" +
                "beginDate='" + startTime + '\'' +
                ", endDate='" + endingTime + '\'' +
                ", taskId='" + taskId + '\'' +
                ", tableName='" + tableName + '\'' +
                ", successCount=" + successCount +
                ", failNumCount=" + failCount +
                ", flag=" + flag +
                '}';
    }
}
